package com.xiaohai.projo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author xiaohai
 * @since 2024-02-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("score")
public class Score implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 分数id
     */
    @ExcelIgnore
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 课程id
     */
    @ExcelIgnore
    private Integer courceId;

    /**
     * 分数
     */
    @ExcelProperty(value = "分数",index = 5)
    private String score;
    /**
     * 考试名称
     */
    @ColumnWidth(20)
    @ExcelProperty(value = "考试名称",index = 0)
    private String name;

    /**
     * 学生id/学号
     */
    @ExcelIgnore
    private Integer stuId;

    /**
     * 教师id
     */
    @ExcelIgnore
    private Integer teaId;
    /**
     * 学期
     */
    @ExcelIgnore
    private Integer term;
    /**
     * 年级
     */
    @ExcelIgnore
    private Integer grade;

    /**
     * 1:删除 0:未删除
     */
    @ExcelIgnore
    @TableLogic
    private Integer isDelete;

    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}
